*
* It must be called with interrupts disabled.
*/
-extern spinlock_t timerlist_lock;
int set_timeout_timer(void)
{
- u64 alarm = 0;
- int ret = 0;
- int cpu = smp_processor_id();
-
- spin_lock(&timerlist_lock);
-
- /*
- * This is safe against long blocking (since calculations are not based on
- * TSC deltas). It is also safe against warped system time since
- * suspend-resume is cooperative and we would first get locked out. It is
- * safe against normal updates of jiffies since interrupts are off.
- */
- alarm = __jiffies_to_st(next_timer_interrupt());
-
- /* Failure is pretty bad, but we'd best soldier on. */
- if ( HYPERVISOR_set_timer_op(alarm) != 0 )
- ret = -1;
-
- spin_unlock(&timerlist_lock);
-
- return ret;
+ u64 alarm = 0;
+ int ret = 0;
+
+ /*
+ * This is safe against long blocking (since calculations are
+ * not based on TSC deltas). It is also safe against warped
+ * system time since suspend-resume is cooperative and we
+ * would first get locked out. It is safe against normal
+ * updates of jiffies since interrupts are off.
+ */
+ alarm = __jiffies_to_st(next_timer_interrupt());
+
+ /* Failure is pretty bad, but we'd best soldier on. */
+ if ( HYPERVISOR_set_timer_op(alarm) != 0 )
+ ret = -1;
+
+ return ret;
}
#include <linux/init.h>
#include <linux/platform.h>
#include <linux/pm.h>
+#include <linux/rcupdate.h>
+extern int set_timeout_timer(void);
void xen_cpu_idle (void)
{
+ int cpu = smp_processor_id();
+
local_irq_disable();
- if (need_resched() || !list_empty(&RCU_curlist(cpu)))
+ if (need_resched() || !list_empty(&RCU_curlist(cpu))) {
local_irq_enable();
return;
}